package com.dumovie.message.sms;

import java.util.ArrayList;
import java.util.List;


/**
 * @author kim 2015年6月23日
 */
public class SmsMessage {

	private final List<String> mobiles = new ArrayList<String>();

	private final String content;

	public SmsMessage(String content) {
		this.content = content;
	}

	public SmsMessage add(String mobile) {
		this.mobiles.add(mobile);
		return this;
	}

	public String getContent() {
		return this.content;
	}

	public List<String> getTargets() {
		return this.mobiles;
	}

	public String getTargetsAsString() {
		StringBuffer buffer = new StringBuffer();
		for (String mobile : this.mobiles) {
			buffer.append(mobile).append(",");
		}
		return buffer.substring(0, buffer.length() - 1);
	}
}
